<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<%@ page import="com.google.appengine.api.users.User" %>
<%@ page import="com.google.appengine.api.users.UserService" %>
<%@ page import="com.google.appengine.api.users.UserServiceFactory" %>

<% final UserService userService = UserServiceFactory.getUserService();
final User user = userService.getCurrentUser();
if (user == null)
	response.sendRedirect(userService.createLoginURL(request.getRequestURI()));
else { %>
	<p>
		user ID: <%= user.getUserId() %>
		<br />
		nickname: <%= user.getNickname() %>
		<br />
		email: <%= user.getEmail() %>
		<br />
		federated identity: <%= user.getFederatedIdentity() %>
		<br />
		auth domain: <%= user.getAuthDomain() %>
	</p>
<% } %>
